home *** CD-ROM | disk | FTP | other *** search
/ Almathera Ten Pack 3: CDPD 3 / Almathera Ten on Ten - Disc 3: CDPD3.iso / fish / 726-750 / 732 / rtracker / install < prev    next >
Text File  |  1995-03-18  |  11KB  |  544 lines

  1. ; $VER: RTracker_Install 1.0 (Tuesday 15-Sep-92)
  2. ; RTracker System Installation Script
  3.  
  4. (complete 0)
  5.  
  6. ;==================================================================
  7. ;Constants
  8. ;==================================================================
  9.  
  10. (set #AskForDir
  11.    (cat
  12.       "Where should I install RTracker and it's support files??"  
  13.    )
  14. )
  15.  
  16. (set #AskForDir_help
  17.    (cat
  18.       "Enter the directory where RTracker and it's support files"
  19.       " should be installed.  If the directory doesn't exist,"
  20.       " specify it anyway, and use the create directory gadget.\n\n"
  21.    )
  22. )
  23.  
  24. (set #CopyRTracker
  25.    (cat
  26.       "The following files will be copied into the directory"
  27.       " you specified."
  28.    )
  29. )
  30.  
  31. (set #CopyRTracker_help
  32.    (cat
  33.       "This will copy RTracker, RTInterface, and all support"
  34.       " files into the drawer you specified.\n\n"
  35.    )
  36. )
  37.  
  38. (set #CopyLibs
  39.    (cat
  40.       "The following library needs to be installed for RTracker to work.\n"
  41.    )
  42. )
  43.  
  44. (set #CopyLibs_help
  45.    (cat
  46.       "You do not have the proper libraries to run RTracker.  This will"
  47.       " install them for you.\n\n"
  48.    )
  49. )
  50. ;==================================================================
  51. ;Main
  52. ;==================================================================
  53.  
  54.  
  55. (set @default-dest 
  56.    (tackon @default-dest "RTracker")
  57. )
  58.  
  59. (complete 3)
  60.  
  61. (set myans 
  62.     (askbool
  63.         (prompt "Would you like to install RTracker in "
  64.                  @default-dest
  65.          "?"
  66.         )
  67.         (help "If you would like to install RTracker in "
  68.               @default-dest
  69.               ", answer YES.  If you would like to choose your"
  70.                       " own directory, select NO\n\n"
  71.                       @askbool-help
  72.                   )
  73.         (choices "Yes" "No")
  74.         (default "Yes");
  75.     )
  76. )
  77.  
  78. (if (NOT myans) 
  79. (
  80. (set RTracker_dest
  81.       (askdir (prompt #AskForDir) 
  82.               (help #AskForDir_help
  83.                     @askdir-help
  84.               )
  85.               (default @default-dest)
  86.       )
  87. )
  88. )
  89. )
  90.  
  91. (if myans
  92.     (
  93.         (run (cat "makedir " @default-dest))
  94.         (set RTracker_dest @default-dest) 
  95.     )
  96. )
  97.  
  98. (set @default-dest RTracker_dest)
  99.  
  100. (complete 6)
  101.  
  102. (set #notice
  103.    (cat
  104.       "Installed RTracker into "
  105.       @default-dest
  106.       "."
  107.    )
  108. )
  109.  
  110.  
  111. ; Okay, we got a directory to dump everything into, so we make it the 
  112. ; default directory
  113.  
  114. ;(set @default-dest RTracker_dest)
  115.  
  116. ; First, we copy RTracker and stuff to that directory.
  117.  
  118. (copyfiles
  119.    (prompt #CopyRTracker)
  120.    (source "")
  121.    (dest RTracker_dest)
  122.    (pattern "(RT#?|De#?|mm)")
  123.    (infos)
  124.    (confirm)
  125.    (help
  126.       #CopyRTracker_help
  127.       @copyfiles-help
  128.    )
  129. )
  130.  
  131. (complete 9)
  132.  
  133. ; Modify User-Startup
  134.  
  135. (set #RTAssigns
  136.    (cat
  137.       "Assign Prefs: "
  138.       RTracker_dest
  139.    )
  140. )
  141.  
  142. (startup
  143.    "RTracker"
  144.    (prompt "One command needs to be added to your s:User-Startup file"
  145.            " in order to use RTracker.\n"
  146.            "The command is:\n\n"
  147.            #RTAssigns
  148.            "\n\nDo you want it to be added?"
  149.    )
  150.  
  151.    (help (cat
  152.           "The assign:\n\n"
  153.           #RTAssigns
  154.           "\nneeds to be made before running the software.  This will"
  155.           " do it for you.\n\n\n"
  156.          )
  157.          @startup-help
  158.    )
  159.    (command #RTAssigns)   
  160. )
  161.  
  162. (complete 12)
  163.  
  164. (run #RTAssigns)
  165.  
  166. (complete 15)
  167.  
  168. (if (NOT(exists "Libs:DesTracker.Library"))
  169.    (copyfiles
  170.       (prompt #CopyLibs)
  171.       (help #CopyLibs_help @copyfile-help)
  172.       (source "libs/")
  173.       (dest "Libs:")
  174.       (pattern "Des#?.library")  
  175.       (confirm)     
  176.    )
  177. )
  178.  
  179. (complete 18)
  180.  
  181. (if (NOT(exists "Libs:RexxHost.Library"))
  182.    (copyfiles
  183.       (prompt #CopyLibs)
  184.       (help #CopyLibs_help @copyfile-help)
  185.       (source "libs/")
  186.       (dest "Libs:")
  187.       (pattern "RexxHost.library")  
  188.       (confirm)     
  189.    )
  190. )
  191.  
  192. (complete 21)
  193.  
  194. ;Okay, now we set up Decompress
  195.  
  196. ;Make a directory for it
  197. (set Decompress_dest
  198.       (askdir (prompt "Please create a directory that will be used to"
  199.                       " decompress files.  WARNING:  This must be a"
  200.                       " PERMANENT, and EMPTY directory.  It must STAY"
  201.                       " empty!  RTracker will delete the contents of this"
  202.                       " directory often.") 
  203.               (help "In able to decompress files, RTracker must have a free"
  204.                    " directory to use.  This gives you the chance to make one."
  205.                    "  After decompression, the decompressed file will reside"
  206.                    " here until the next time you decompress something.\n\n"
  207.                     @askdir-help
  208.               )
  209.               (default @default-dest)
  210.       )
  211. )
  212.  
  213. (complete 24)
  214.  
  215. (set decompress 0)
  216.  
  217. (complete 27)
  218.  
  219. ;LHA
  220. (set LHA_start "#?.LHA|")
  221. (set LHA_end "lha >con:0/0/500/100/Decompressing e \"%\" ")
  222.  
  223.  
  224. ;PP Decrunch
  225. (set PP_start "#?.pp|")
  226. (set PP_end "decrunch >con:0/0/500/100/Decompressing \"%\" ")
  227.  
  228.  
  229. (if (exists "c:Lha")
  230.    (
  231.    (working "Setting up LHA decompression.")
  232.    
  233.    (textfile 
  234.       (dest "t:LHA.temp")
  235.       (append 
  236.          (cat
  237.             LHA_start
  238.             "c:"
  239.             LHA_end
  240.             (tackon
  241.                Decompress_dest
  242.                "|"
  243.             )
  244.             Decompress_dest
  245.             "|"
  246.          )
  247.       )
  248.       (prompt "Finished setting up LHA decompression")
  249.    )   
  250.    
  251.    (set decompress 1)
  252.    )
  253. )
  254.  
  255. (complete 30)
  256.  
  257. (if (exists "c:decrunch")
  258.    (
  259.    (working "Setting up Decrunch (PowerPacker) decompression.")
  260.  
  261.    (textfile 
  262.       (dest "t:PP.temp")
  263.       (append 
  264.          (cat
  265.             PP_start
  266.             "c:"
  267.             PP_end
  268.             Decompress_dest
  269.             "|"
  270.             Decompress_dest
  271.             "|"
  272.          )
  273.       )
  274.       (prompt "Finished setting up Decrunch (PowerPacker) decompression.")
  275.    )
  276.    
  277.    (set decompress 1)
  278.    )
  279. )
  280.  
  281. (complete 33)
  282.  
  283. (set LHADecompress_dest 0)
  284. (set PPDecompress_dest 0)
  285.  
  286.  
  287.  
  288.  
  289.  
  290. (if (NOT(exists "c:lha"))
  291.    (
  292.    
  293.    
  294.       (if
  295.       
  296.       
  297.         (askbool
  298.            (prompt "LHA was not found in your c: directory.  Would you like to"
  299.                    " read it from another place?"
  300.            )
  301.            (help "RTracker needs to be able to load and run LHA from the directory"
  302.                  " you will specify, so it is important that the location of LHA"
  303.                  " is readily available.  If you don't want to use LHA as a"
  304.                  " decompressor, or don't have LHA, answer NO.\n\n "
  305.                  @askbool-help
  306.            )
  307.            (default "Yes")
  308.            (choices "Yes" "No")
  309.         )
  310.       
  311.       (
  312.       
  313.          (set LHADecompress_dest
  314.             (askdir (prompt "Please enter directory where LHA exists.") 
  315.                   (help "In able to decompress LHA files, RTracker must have"
  316.                         "  access"
  317.                         " to LHA.  This gives you the chance to specify where it"
  318.                         " is.\n\n"
  319.                         @askdir-help
  320.                   )
  321.                   (default @default-dest)
  322.             )
  323.          );set
  324.          (working "Setting up LHA decompression.")
  325.          (textfile 
  326.             (dest "t:LHA.temp")
  327.             (append 
  328.                (cat
  329.                   LHA_start
  330.                   (tackon
  331.                         LHADecompress_dest
  332.                         LHA_end
  333.                   )
  334.                   (tackon 
  335.                      Decompress_dest
  336.                       "|"
  337.                   )
  338.                   Decompress_dest
  339.                   "|"
  340.                )
  341.             )
  342.             (prompt "Finished LHA Decompression")
  343.          )   
  344.          (set decompress 1)      
  345.       
  346.       
  347.       );if askbool container
  348.       
  349.       
  350.       );if askbool  
  351.       
  352.       
  353.    ) ;if exists container     
  354. );if exists
  355.  
  356.  
  357.  
  358.  
  359. (complete 36)
  360.  
  361.  
  362. (if (NOT(exists "c:decrunch"))
  363.    (
  364.    
  365.    
  366.       (if
  367.       
  368.       
  369.         (askbool
  370.            (prompt "Decrunch was not found in your c: directory."
  371.                    " Would you like to read it from another place?"
  372.            )
  373.            (help "RTracker needs to be able to load and run Decrunch from"
  374.                  " the directory you will specify, so it is important that"
  375.                  " the location of Decrunch is readily available.  If you"
  376.                  " don't want to use Decrunch as a decompressor, or don't"
  377.                  " have the program, answer NO.\n\n"
  378.                  @askbool-help
  379.            )
  380.            (default "Yes")
  381.            (choices "Yes" "No")
  382.         )
  383.       
  384.       (
  385.       
  386.          (set PPDecompress_dest
  387.             (askdir (prompt "Please enter the directory where PP Decrunch exists.")
  388.                   (help "In able to decompress PowerPacker files, RTracker"
  389.                         " must have access to PowerPacker's Decrunch utility."
  390.                         "  This gives you the chance to specify where it"
  391.                         " is.\n\n"
  392.                         @askdir-help
  393.                   )
  394.                   (default @default-dest)
  395.             )
  396.          );set
  397.          (working "Setting up PowerPacker decompression.")
  398.          (textfile 
  399.             (dest "t:PP.temp")
  400.             (append 
  401.                (cat
  402.                   PP_start
  403.                   (tackon
  404.                         PPDecompress_dest
  405.                         PP_end
  406.                   )
  407.                   Decompress_dest
  408.                   "|"
  409.                   Decompress_dest
  410.                   "|"
  411.                )
  412.             )
  413.             (prompt "Still creating Finished PowerPacker prefs")
  414.          )   
  415.          (set decompress 1)      
  416.       
  417.       
  418.       );if askbool container
  419.       
  420.       
  421.       );if askbool  
  422.       
  423.       
  424.    ) ;if exists container     
  425. );if exists
  426.  
  427. (complete 39)
  428.  
  429. (if (exists "t:LHA.temp")
  430.  (
  431.    (run "type >>t:Decompress.RTPrefs t:LHA.temp")
  432.    (run "delete t:LHA.temp")
  433.  )
  434. )
  435.  
  436.  
  437. (complete 42)
  438.  
  439. (if (exists "t:PP.temp")
  440.   (
  441.    (run "type >>t:Decompress.RTPrefs t:PP.temp")
  442.    (run "delete t:PP.temp")
  443.   )
  444. )
  445.  
  446.  
  447. (complete 45)
  448.  
  449. (run "type >>t:Decompress.RTPrefs AtSign.cp")
  450. (complete 48)
  451. (run (cat "c:copy t:Decompress.RTPrefs " RTracker_dest))
  452. (complete 51)
  453. (run "c:delete t:Decompress.RTPrefs")
  454. (complete 54)
  455.  
  456. ;Okay, we do prefs.
  457. (working "Creating Prefs")
  458.  
  459. (run 
  460.    (
  461.       cat "copy RTPrefs.cp " (tackon RTracker_dest "RTPrefs")
  462.    )
  463. )
  464.  
  465. (complete 57)
  466.  
  467. (textfile 
  468.    (dest "t:RTDEST")
  469.    (append (cat RTracker_dest "\n"))
  470.    (prompt "Creating RTPrefs")
  471. )
  472.  
  473. (complete 60)
  474.  
  475. (set Mods_dest
  476.    (askdir
  477.       (prompt "Please select the directory where you usually keep your"
  478.               " MODs"
  479.       )
  480.       (help (cat "This will set RTracker's default directory.\n\n")
  481.             @askdir-help
  482.       )
  483.       (default @default-dest)
  484.    )
  485. )
  486.  
  487. (complete 63)
  488.  
  489. (textfile 
  490.    (dest "t:MODDEST")
  491.    (append (cat Mods_dest "\n"))
  492.    (prompt "Still creating RTPrefs")
  493. )
  494.  
  495. (complete 66)
  496.  
  497. (textfile 
  498.    (dest "t:UNDEST")
  499.    (append "Unused\n")
  500.    (prompt "Still creating RTPrefs")
  501. )
  502.  
  503. (complete 69)
  504.  
  505. (working "Finishing off RTPrefs.")
  506.  
  507. (run 
  508.    (cat "Type >>" (tackon RTracker_dest "RTPrefs") " t:RTDEST")
  509. )
  510.  
  511. (complete 72)
  512.  
  513. (run 
  514.    (cat "Type >>" (tackon RTracker_dest "RTPrefs") " t:MODDEST")
  515. )
  516.  
  517. (complete 75)
  518.  
  519. (run 
  520.    (cat "Type >>" (tackon RTracker_dest "RTPrefs") " t:UNDEST")
  521. )
  522.  
  523. (complete 78)
  524.  
  525. (working "Cleaning up...")
  526. (run "delete t:RTDEST")
  527. (complete 81)
  528. (run "delete t:MODDEST")
  529. (complete 84)
  530. (run "delete t:UNDEST")
  531. (complete 87)
  532. (run 
  533.    (cat
  534.       "delete "
  535.       (tackon
  536.          RTracker_dest
  537.          "RTPrefs.cp"
  538.       )
  539.    )
  540. )
  541.  
  542. (complete 100)
  543. (exit)
  544.